from langchain.prompts import load_prompt
prompt = load_prompt("sample_prompt.json")
s = prompt.format(name="小黑", what="恐怖的")
print(s)

prompt = load_prompt("sample_prompt.yaml")
s = prompt.format(name="小黑", what="快乐的")
print(s)

prompt = load_prompt("prompt_with_output_parser.json")
s = prompt.output_parser.parse(
    "George Washington was born in 1732 and died in 1799.\nScore: 1/2"
)
print(s)